package day05;

public class ShangPingShuJu {
    public static void main(String[] args) {
        // 表头部分
        System.out.println("--------------------电子产品库存清单--------------------");
        System.out.println("商品型号\t尺寸（英寸）\t价格（元）\t库存数");
        System.out.println("------------------------------------------------------");
        
        // 定义变量
        String model;
        double size;
        double price;
        int stock;
        
        // 表格内容
        model = "MacBookAir";
        size = 13.3;
        price = 5699.0;
        stock = 5;
        System.out.println(model + "\t" + size + "\t" + price + "\t" + stock);
        
        model = "ThinkPadT490";
        size = 14.0;
        price = 8499.0;
        stock = 10;
        System.out.println(model + "\t" + size + "\t" + price + "\t" + stock);
        
        model = "MateBook 14";
        size = 14.0;
        price = 7199.0;
        stock = 18;
        System.out.println(model + "\t" + size + "\t" + price + "\t" + stock);
        
        // 表尾部分
        int totalStock = 5 + 10 + 18;
        double totalAmount = 5699.0 * 5 + 8499.0 * 10 + 7199.0 * 18;
        System.out.println("------------------------------------------------------");
        System.out.println("总库存数：" + totalStock);
        System.out.println("商品库存总金额：" + totalAmount + "元");
    }
}
